 |
|
 |
Subject: Swap Google Analytics Script UA (Semi-colons, and errors)... |
 |
 |
 |
Product Area: Domino Designer on Eclipse (DDE) |
 |
Technical Area: Application Development |
 |
Platform: Windows |
 |
Release: 8.5.2 |
 |
Reproducible: Always |
 |
 |
 |
 |
Hey Experts!
I have a two part question:
I tested a Google Analytics script in one of our Xpages, script works perfectly, I get my GA reports data, no problems. I also wanted to test a Client's script but using our Dev account User-Agent (example: UA-XXXXXX-1. Looks like I am not getting any data. I suspect the User-Agent account is created with should be used with the script furnished.
Is there a way to comfortable swap User-Agents among accounts? I did not get a response from Google about this as of yet...
Also, I am experiencing a little glitch with our client's script. Our dev version is referenced in our Xpage via a Script Library, works wonders. The client's version threw an error, and attempt to add what I think is semi-colons missing did not take. Here is the error: when I attempt to save the Client's script as a Script Library "Error: Saved Failed, cannot save with syntax errors. Line 3: missing ] after element list. Can you have a look to see what I may be missing? As you can tell the ] is clearly there, identacally to our Dev version of the script.
Below is our Dev script (working original) followed by our Client's, then again our Dev script but with a variation of the Client's script to add two lines of code
Note: Dev script works, Client script does not, Modified Dev script does not work
Dev Script
++++++++++++++++++++++++++++++++++++++++++++>>
[CODE]
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-XXXXXXX-X']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
[/CODE]
Client Script (not working)
++++++++++++++++++++++++++++++++++++++++++++>>
[CODE]
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount'
'UA-XXXXX-X']);
_gaq.push(['_setDomainName'
'none']);
_gaq.push(['_setAllowLinker'
true]);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script');
ga.type =
'text/javascript'
ga.async = true;
ga.src = ('https:' ==
document.location.protocol ? 'https://ssl' :
'http://www') +
'.google-analytics.com/ga.js';
var s =
document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(ga
s);
})();
</script>
[/CODE]
Modified Dev Script
First, here is Sample code yanked from Client's version/Added to Dev
++++++++++++++++++++++++>>
[CODE]
_gaq.push(['_setDomainName''none']);
_gaq.push(['_setAllowLinker'true]);
[/CODE]
++++++++++++++++++++++++>>
[CODE]
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-XXXXXXXX-X]);
_gaq.push(['_setDomainName''none']);
_gaq.push(['_setAllowLinker'true]);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
[/CODE]
Any thoughts or ideas/solutions are appreciated...
 
Feedback number WEBB8LRL3A created by ~Elizabeth Ekfanalyjip on 09/16/2011

Status: Open
Comments:

Swap Google Analytics Script UA (Se... (~Elizabeth Ekfa... 16.Sep.11)
. . Google Replied UA tied to GA Script... (~Elizabeth Ekfa... 19.Sep.11) |
|  |
|